//
//  YTRankButton.m
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/8/12.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTRankButton.h"
@interface YTRankButton()
@property(nonatomic ,strong)UIView *tipView;
@end
@implementation YTRankButton


- (UIView *)tipView
{
    if (!_tipView) {
        _tipView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 1, self.bounds.size.width, 1)];
    }
    return _tipView;
}


- (void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    
    selected ? [self.tipView setBackgroundColor:self.selectedColor ? self.selectedColor : kEtaicjMainColor] : [self.tipView setBackgroundColor:UIColor.whiteColor];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [self addSubview:self.tipView];
}
@end
